
f = figure();
j=0;
for k=[1 3 4]
    j=j+1;
    subplot(4,3,j)
    thistitle = string(NAMES(k));
    bar(MidEst(k,:),FreqEst(k,:))
    title(thistitle);
    set(gcf,'position',[20 50*j 1000 500])%bottom, left width and height of figure
end
j=0;
for k=5:7
    j=j+1;
    subplot(4,3,k-1)
    thistitle = string(NAMES(k));
    bar(MidEst(k,:),FreqEst(k,:))
    title(thistitle);
    set(gcf,'position',[40 50*j 1000 500])%bottom, left width and height of figure
end
j=0;
for k=8:10
    j=j+1;
    subplot(4,3,k-1)
    thistitle = string(NAMES(k));
    bar(MidEst(k,:),FreqEst(k,:))
    title(thistitle);
    set(gcf,'position',[60 50*j 1000 500])%bottom, left width and height of figure
end
k=2;
subplot(4,3,10)
thistitle = string(NAMES(k));
bar(MidEst(k,:),FreqEst(k,:))
title(thistitle);
set(gcf,'position',[80 50 1000 500])%bottom, left width and height of figure
fileName = horzcat(modelname, '.png');
fileName=join(fileName, "");
saveas(f,fileName);

    
